package edu.hawaii.duedates;

/**
 * This interface is implemented by all libraries. It defines accessor, mutator, attribute, and 
 * toString behaviors.
 * 
 * @author Ronn Reeves and Robin E. Raqueno
 */
public interface ILibrary {

  /**
   * Set the name of this library.
   * 
   * @param name The name of the library.
   */
  public void setName(String name);
  /**
   * Returns the name of this library.
   * 
   * @return String The library name.
   */
  public String getName();

  
  /**
   * Sets the site URL for this library's web site.
   *
   * @param url The web site url.
   */
  public void setSiteURL(String url);
  /**
   * Returns the web site url for this library.
   * 
   * @return String The web site url.
   */
  public String getSiteURL();


  /**
   * Sets the password field of this library's web site.
   *
   * @param fieldName The password field.
   */
  public void setPasswordField(String fieldName);
  /**
   * Returns the password field for this library's web site.
   * 
   * @return String The password field.
   */
  public String getPasswordField();

  
  /**
   * Sets the userID field from this library's web site.
   *
   * @param fieldName The user id field. 
   */
  public void setUserIdField(String fieldName);
  /**
   * Returns the user id field from this library's web site.
   * 
   * @return String The user id field.
   */
  public String getUserIdField();

  
  /**
   * Sets the link to the login page of this library.
   * 
   * @param link The link to the login page.
   */
  public void setLoginLink(String link);
  /**
   * Returns the link to the login page of this library.
   * 
   * @return String The link of the login page.
   */
  public String getLoginLink();

  
  /**
   * Sets the link to the summary page of this library.
   * 
   * @param link The link of the summary page.
   */
  public void setSummaryLink(String link);
  /**
   * Returns the link to the summary page of this library.
   * 
   * @return String The link of the summary page.
   */
  public String getSummaryLink();
  
  
  /**
   * Sets the name of the form containing the login fields for this library.
   * 
   * @param formName The name of the form.
   */
  public void setFormName(String formName);
  /**
   * Returns the name of the form containing the login fields for this library.
   * 
   * @return String The name of the form.
   */
  public String getFormName();

  
  /**
   * Sets the error message displayed by the web site if login fails for this library.
   * 
   * @param message The error message displayed when login fails.
   */
  public void setLoginErrorMessage(String message);
  /**
   * Returns the error message displayed by the web site if login fails for this library.
   * 
   * @return String The error message displayed when login fails.
   */
  public String getLoginErrorMessage();

  
  /**
   * Sets the message displayed by the web site if no items checked out for this library.
   *
   * @param message The message displayed when no items checked out.
   */
  public void setNoBorrowedItemsMessage(String message);
  /**
   * Returns the message displayed by the web site if no items checked out for this library.
   * 
   * @return String The message displayed when no items checked out.
   */
  public String getNoBorrowedItemsMessage();

  
  /**
   * Sets the title column name of the table containing the checked out items.
   * 
   * @param columnName The column name of the table.
   */
  public void setTitleColumn(String columnName);
  /**
   * Returns the title column name of the table containing the checked out items.
   * 
   * @return String The column name of the table.
   */
  public String getTitleColumn();

  
  /**
   * Sets the due date column name of the table containing the checked out items.
   * 
   * @param columnName The column name of the table.
   */
  public void setDateColumn(String columnName);
  /**
   * Returns the due date column name of the table containing the checked out items.
   * 
   * @return String The column name of the table.
   */
  public String getDateColumn();

  
  /**
   * Sets the validity of this library info request.
   * 
   * @param validity  The validity status of this request.
   */
  public void setValid(boolean validity);
  /**
   * Returns true if the library site is valid.
   *
   * @return Boolean The validity of the library info request.
   */
  public boolean isValid();
  

  /**
   * Returns the library name and URL.
   *
   * @return String The name and URL of library.
   */
  public String toString();

}
